#ifndef _ACTION_H_
#define _ACTION_H_

#define RS232_FRAME_LENGTH 28u
#define REF_LEN_RX_BUFF  0xFF
 
#include <cmsis_os2.h>
#include "device.h"
#include "bsp_usart.h"
#include "cmd.h"


typedef struct 
{
  osTimerId_t action_timer_Id;

  fp32 pos_lastX;
  fp32 pos_lastY;
  fp32 pos_x;
  fp32 pos_y;

  fp32 pos_Vx;
  fp32 pos_Vy;

}Action_POS_t;





int8_t ACTIONRECV_Init(Action_POS_t*pos);

int8_t ACTION_StartReceiving(void);

bool_t ACTION_WaitDmaCplt(void);

int8_t ACTION_Parse(Action_POS_t*pos);

int8_t ACTION_DataRefresh(Action_POS_t*pos);

int8_t Action_HandleOffline(Action_POS_t *pos);

void ACT_UpdateXY(float pos_x,float pos_y);

void ACT_ZeroClear(void);








#endif

